﻿MIDP: Compass
=====================

This Java ME application demonstrates the Location API and Scalable 2D Vector 
Graphics API features on the Series 40 and Symbian S60 platforms.
 
The example is a simple compass which shows the direction of North and the 
direction of a selected landmark. The user can also add the current location 
as a landmark. 

-------------------------------------------------------------------------------

PREREQUISITES

Java ME basics

-------------------------------------------------------------------------------

IMPORTANT FILES AND CLASSES

src\..\CompassView.java
src\..\LandMarkManager.java
src\..\LocationFinder.java
src\..\LocationListener.java

res\compass.svg
res\navi.svg

Classes: LocationProvider, Location, LandmarkStore, Landmark, SVGMatrix.

-------------------------------------------------------------------------------

DESIGN CONSIDERATIONS

The application calculates the direction by requesting the course. This means 
that the correct direction is not immediately shown and the user has to walk a 
bit for the GPS to get the proper course. This is done because current Nokia 
phones don't implement the orientation features in the Location API.

When the GPS polling is running, the application uses quite a lot of power. To 
prevent excess power consumption, the application stops the polling when the 
backlight goes off or the screensaver goes on. The polling begins again when 
the backlight goes on or the screensaver goes off.

The SVG images that are manipulated in this example are made a bit differently 
than usual. The image is actually in the top left corner of the SVG viewport. 
This is because otherwise the image would rotate with the centerpoint in the 
top left corner of the image. With the image in the top left corner, the 
rotation works properly and the only thing left to do is translate the image 
back to the center of the viewport.

-------------------------------------------------------------------------------

KNOWN ISSUES

No known issues

-------------------------------------------------------------------------------

BUILD AND INSTALLATION INSTRUCTIONS

The example has been made with NetBeans 6.8 and Series 40 6th Edition SDK. The 
project can be easily opened in NetBeans by selecting 'Open Project' from the 
File menu and selecting the application.

Before opening the project, make sure a compatible SDK (for example, the 
Series 40 6th Edition SDK) is installed and added to NetBeans. Building is 
done by selecting 'Build main project'.

Installing the application on a phone can be done by transfering the JAR file 
via Nokia Ovi Suite or via Bluetooth.

-------------------------------------------------------------------------------

RUNNING THE EXAMPLE

The application has two views. The main view shows the direction and the 
currently selected landmark. You can switch the current landmark by pressing 
left or right.

The second view is for adding landmarks. To open it, press the left softkey 
which opens the 'Store Location' view. Pressing up or down highlights the text 
field and pressing the middle softkey opens a text editor where you can type 
the name of the new landmark. To get back, press the right softkey.

Getting the correct direction requires the user to walk for a while so that 
GPS is able to determine the correct course.

-------------------------------------------------------------------------------

COMPATIBILITY

Series 40 6th Edition
S60 3rd Edition, Feature Pack 2 

Tested on:
Nokia 2710 Navigation Edition
Nokia E75 


Developed with:
Netbeans 6.8
Series 40 6th Edition SDK
s60 3rd Edition, FP2 SDK

-------------------------------------------------------------------------------

CHANGE HISTORY

1.0 	First Release

-------------------------------------------------------------------------------

RELATED DOCUMENTATION

JSR-179 Location API for Java ME v1.0.1 in the Java Developer's Library:
http://library.forum.nokia.com/topic/Java_Developers_Library/GUID-4AEC8DAF-DDCC-4A30-B820-23F2BA60EA52/overview-summary.html

Scalable 2D Vector Graphics API for Java ME (JSR-226) in the Java Developer's Library:
http://library.forum.nokia.com/topic/Java_Developers_Library/GUID-47BB9F00-FE65-484D-BD71-F54AF5884D32/overview-summary.html